﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using YFrameWork.RunTime;

namespace YFrameWork.RunTime_Example
{
    public class TestPlayerprefs : MonoBehaviour
    {
        public InputField InputField;
        public Text Text_Show;
        public Button But_Save;
        private const string SaveTestData = "SaveTestData";
        private void Start()
        {
            But_Save.onClick.AddListener(OnSavaClick);
            Text_Show.text = GameEntry.Instance.GetComponent<SettingComponent>().GetString(SaveTestData,"1");
        }
        private void OnSavaClick()
        {
            GameEntry.Instance.GetComponent<SettingComponent>().SetString(SaveTestData, InputField.text);
            Log.Debug("保存点击了,数据是：{0}", InputField.text);
        }
    }
}